package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ContractManageRelationMapper;
import com.ruoyi.system.domain.ContractManageRelation;
import com.ruoyi.system.service.IContractManageRelationService;

/**
 * 合同关联子合同关系Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-16
 */
@Service
public class ContractManageRelationServiceImpl implements IContractManageRelationService
{
    @Autowired
    private ContractManageRelationMapper contractManageRelationMapper;

    /**
     * 查询合同关联子合同关系
     *
     * @param id 合同关联子合同关系主键
     * @return 合同关联子合同关系
     */
    @Override
    public ContractManageRelation selectContractManageRelationById(Long id)
    {
        return contractManageRelationMapper.selectContractManageRelationById(id);
    }

    @Override
    public List<ContractManageRelation> selectContractManageRelationByContractId(Long id)
    {
        return contractManageRelationMapper.selectContractManageRelationByContractId(id);
    }
    @Override
    public List<ContractManageRelation> selectContractManageRelationByContractRelationId(Long contractRelationId)
    {
        return contractManageRelationMapper.selectContractManageRelationByContractRelationId(contractRelationId);
    }

    /**
     * 查询合同关联子合同关系列表
     *
     * @param contractManageRelation 合同关联子合同关系
     * @return 合同关联子合同关系
     */
    @Override
    public List<ContractManageRelation> selectContractManageRelationList(ContractManageRelation contractManageRelation)
    {
        return contractManageRelationMapper.selectContractManageRelationList(contractManageRelation);
    }

    /**
     * 新增合同关联子合同关系
     *
     * @param contractManageRelation 合同关联子合同关系
     * @return 结果
     */
    @Override
    public int insertContractManageRelation(ContractManageRelation contractManageRelation)
    {
        return contractManageRelationMapper.insertContractManageRelation(contractManageRelation);
    }

    /**
     * 修改合同关联子合同关系
     *
     * @param contractManageRelation 合同关联子合同关系
     * @return 结果
     */
    @Override
    public int updateContractManageRelation(ContractManageRelation contractManageRelation)
    {
        return contractManageRelationMapper.updateContractManageRelation(contractManageRelation);
    }
    @Override
    public int deleteContractManageRelationData(ContractManageRelation contractManageRelation)
    {
        return contractManageRelationMapper.deleteContractManageRelationData(contractManageRelation);
    }

    /**
     * 批量删除合同关联子合同关系
     *
     * @param ids 需要删除的合同关联子合同关系主键
     * @return 结果
     */
    @Override
    public int deleteContractManageRelationByIds(Long[] ids)
    {
        return contractManageRelationMapper.deleteContractManageRelationByIds(ids);
    }

    /**
     * 删除合同关联子合同关系信息
     *
     * @param id 合同关联子合同关系主键
     * @return 结果
     */
    @Override
    public int deleteContractManageRelationById(Long id)
    {
        return contractManageRelationMapper.deleteContractManageRelationById(id);
    }
    @Override
    public int deleteContractManageRelationByContractId(Long contractId)
    {
        return contractManageRelationMapper.deleteContractManageRelationByContractId(contractId);
    }
}
